{include file="public/layout" /}
<style type="text/css">
.yes {
    color: #1BBC9D;
    cursor: default;
}
</style>
<nav class="breadcrumb">
	<i class="Hui-iconfont">&#xe67f;</i> 首页 
	<span class="c-gray en">&gt;</span> 财务管理 
	<span class="c-gray en">&gt;</span> 提现列表
	<a class="btn btn-success radius r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新" ><i class="Hui-iconfont">&#xe68f;</i></a>
</nav>
<div class="page-container" style="margin-top: 20px;">
	<form class="navbar-form form-inline" action="{url:('/Admin/admin/index')}" method="get">
	<div class="text-c"> 日期范围：
		<input type="text" onfocus="WdatePicker()" id="datemin" class="input-text Wdate" style="width:120px;" name="start_time" value="{$stime|date='Y-m-d'}">
		-
		<input type="text" onfocus="WdatePicker()" id="datemax" class="input-text Wdate" style="width:120px;" name="end_time" value="{$etime|date='Y-m-d'}">
		<input type="text" class="input-text" style="width:250px" placeholder="用户ID" name="keyword">
		<select id="status" name="status" class="form-control" style="height: 30px;">
        <option value="" selected="">状态</option>
        <option value="-1">审核失败</option>
        <option value="0">待审核</option>
        <option value="1">申请成功</option>
         </select>
		<button type="submit" class="btn btn-success" id="" name=""><i class="Hui-iconfont">&#xe665;</i> 搜索</button>
	</div>
    </form>
	<div class="cl pd-5 bg-1 bk-gray mt-20"> 
	<span class="r">共有数据：<strong>{$count}</strong> 条</span> </div>
	<table class="table table-border table-bordered table-hover table-bg">
		<thead>
			<tr>
				<th scope="col" colspan="9">提现列表</th>
			</tr>
			<tr class="text-c">
				<th width="25"><input type="checkbox"></th>
				<th width="40">ID</th>
				<th width="200">用户昵称</th>
				<th width="200">申请时间</th>
				<th width="200">申请金额</th>
				<th width="200">扣除手续费</th>
				<th width="200">实际到账金额</th>
				<th width="200">状态</th>
				<th width="70">操作</th>
			</tr>
		</thead>
		<tbody>
			{foreach name="list" item="vo" key="k" }
			<tr class="text-c">
				<td><input type="checkbox" value="{$vo.id}" name="id"></td>
				<td>{$vo.id}</td>
				<td>{$vo.realname}</td>
				<td>{$vo.create_time|date="Y-m-d H:i:s"}</td>
				<td>{$vo.money}</td>
				<td>{$vo.taxfee}</td>
				<td>{$vo.money - $vo.taxfee}</td>
				<td>
					{if $vo.status == 0 }
					<span style="color: #1BBC9D;">申请中</span>
					{elseif $vo.status == 1 }
					<span style="color: #1BBC9D;">审核通过</span>
					{elseif $vo.status == 2 }
					<span style="color: #1BBC9D;">付款失败</span>
					{elseif $vo.status == -1 }
					<span style="color: #1BBC9D;">审核失败</span>
					{elseif $vo.status == 3 }
					<span style="color: #1BBC9D;">拒接提现</span>
					{/if}
				</td>
				<td class="f-14">
					<a title="查看详情" href="/admin/withdraw/info?id={$vo.id}" style="text-decoration:none">
					<img src="/public/h-ui.admin/images/y.png" style="width: 15px !important; height: 15px !important;"></a>
					 <a title="删除" href="javascript:;" onclick="del(this)" data-url="/Admin/withdraw/del" data-id="{$vo.id}" class="ml-5" style="text-decoration:none"><i class="Hui-iconfont">&#xe6e2;</i>
					 </a>
				</td>
			</tr>
			{/foreach}
		</tbody>
	</table>
	 <div>{$list->render()|raw}</div>
</div>
{include file="public/footer" /}
<!--请在下方写此页面业务相关的脚本-->
<script type="text/javascript" src="/public/h-ui.admin/lib/datatables/1.10.0/jquery.dataTables.min.js"></script>
<script type="text/javascript" src="/public/h-ui.admin/lib/My97DatePicker/4.8/WdatePicker.js"></script> 
<script type="text/javascript">
/*删除*/
function del(obj){
	layer.confirm('删除须谨慎，确认要删除吗？',function(index){
		$.ajax({
			type: 'POST',
			url: $(obj).attr('data-url'),
			data:{id: $(obj).attr('data-id')},
			dataType: 'json',
			success: function(data){
				$(obj).parents("tr").remove();
				layer.msg('已删除!',{icon:1,time:1000});
			},
			error:function(data) {
				console.log(data.msg);
			},
		});		
	});
}
</script>
</body>
</html>